package com.fc.mall.controller;
/**
 * Created by Administrator on 2019/9/17.
 */

import com.fc.mall.dto.CommonResult;
import com.fc.mall.dto.UmsMemberIntegrationQueryParam;
import com.fc.mall.service.UmsIntegrationChangeHistoryService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description TODO
 * @Author Climb
 * @Date 2019/9/17
 **/
@RestController
@Api(tags = "UmsIntegrationController", description = "积分查询")
@RequestMapping("/memberIntegration")
public class UmsIntegrationChangeHistoryController {
    @Autowired
    private UmsIntegrationChangeHistoryService integrationService;

    @ApiOperation("通过ID查询会员积分")
    @GetMapping("list")
    public CommonResult list(@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
                             @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                             UmsMemberIntegrationQueryParam queryParam) {
        return new CommonResult().pageSuccess(integrationService.selectById(queryParam,pageSize,pageNum));
    }
}
